<%--
  Created by IntelliJ IDEA.
  User: aiwzy
  Date: 2022/4/18
  Time: 15:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>我的菜谱</title>
    <link rel="stylesheet" href="css/me.css" type="text/css">
    <link rel="stylesheet" href="css/head.css" type="text/css">
</head>
<body>
<div class="head">
    <ul class="u1">
        <li><a href="index.jsp" >美食天下 首页</a></li>
        <li><a href="dish.jsp">菜谱</a></li>
        <li><a href="cook.jsp">食材</a></li>
        <li><a href="#">专题</a></li>
        <li><a href="#">笔记</a></li>
        <li><a href="#">社区</a></li>
        <li><a href="#">活动</a></li>
        <li><a href="#">搜索</a></li>
    </ul>
    <a class="nr" href="#"><img src="image/nr3.png" style="width: 18px;height: 18px;margin-top: 5px;"/><br/>客户端</a>
    <ul class="u2" style=" position: fixed;
    right: 68px;
    top: -16px;margin-right: 4px">
        <li class="pic">
            <img src="
        <c:if test="${!sessionScope.user.avatar.equals('')}">
        ${sessionScope.user.avatar}
        </c:if>
        <c:if test="${!sessionScope.user.avatar.equals('')}">
        https://tse2-mm.cn.bing.net/th/id/OIP-C.Z8cO0OriANaUVakbQ6n0BwAAAA?w=153&h=165&c=7&r=0&o=5&dpr=1.65&pid=1.7
        </c:if>
" onclick="jump()" style="width: 35px;height: 35px; border-radius: 45%;cursor: pointer" >
            <script src="js/jquery-3.2.1.min.js"></script>
            <script type="text/javascript">
                function jump(){
                    var src = $("img")[0].src;
                    $.ajax({
                        url:http_request+"/member.jsp",
                        data:{
                            img:src
                        },
                        dataType:"text",
                        success:function (){
                            alert("欢迎来到个人中心！")
                            window.location.href=http_request+"/member.jsp"
                        },
                        error:function (){
                            alert("个人中心跳转失败！")
                        }
                    })
                }
            </script>

        </li>
        <li class="l2">
            <div class="d1" >
                <a href="login.jsp" >登录/注册</a>
            </div>

        </li>
        <li class="l1" style="margin-top: 4px"><div><a href="makeCook.jsp"><img src="image/nr1.png" style="width: 18px;height: 18px;margin-top: 5px;margin-right: 2px;"/><br/>发布</a></div></li>
        <li class="l1" style="margin-top: 4px"><div><a href="#"><img src="image/nr2.png" style="width: 18px;height: 18px;margin-top: 5px;margin-right: 2px"/><br/>签到有礼</a></div></li>
    </ul>
</div>
<!-- 主框架 -->
<div>

    <div class="mod_left">
        <div class="menu_wrap">
            <dl>
                <dt >
                    <a  href="member.jsp">会员<br>中心</a>
                </dt>
                <dt >
                    <a class=on href="myCook.jsp">菜谱</a>
                </dt>

                <dt >
                    <a  href="#">话题</a>
                </dt >
                <dt >
                    <a   href="#">日志</a>
                </dt>
                <dt >
                    <a  href="index.jsp">菜单</a>
                </dt>
                <dt >
                    <a  href="#">收藏</a>
                </dt>
                <dt >
                    <a  href="#">账户<br>设置</a>
                </dt>
            </dl>
        </div>

    </div>

    <!-- 右侧 -->
    <div class="mod_right">

        <div id="mod_location">
            <div class="mod_location clear">
                <div class="left">
                    <a href="myCook.jsp" class=on>我的菜谱</a>
                </div>
                <div class="right">
                    <a class="add" href="makeCook.jsp" >发布新菜谱</a>
                </div>
            </div>
        </div>

        <div class="ui_newlist_1 get_num mt60 clear" id="J_list">
            <div class="m_search clear search_b">
                <input name="recipename" id="tbid" class="inputS" onkeydown="keyLogin()"  placeholder="搜索我发布的菜谱" type="text" value="">&nbsp;
                <input value="&#12288;搜索&#12288;" type="submit" id="tbid_btn" class="ui_btn btn" />
            </div>
            <div class="ui_no_data">
                <ul>
                    <c:forEach var="dish" items="${sessionScope.dishList}"  end="${sessionScope.dishList.size()}">
                    <li>
                        <div class="d11"><img src="${dish.img}" /></div>
                        <a style=" display: block;
    width: 230px;
    height: 32px;
    text-align: center;
    font-size: 18px;
    text-decoration: none;
    color: #333;" href="cook.jsp">${dish.dname}<br/></a>
                        <a style="display: block;
    width: 230px;
    height: 32px;
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    color: #999;" href="member.jsp">${dish.uname}</a>
                    </li>

                </c:forEach>
                </ul>
                <p>
                    您还没有发布新菜谱噢，快点击这里<a style="color: blueviolet; font-size: 20px" href="makeCook.jsp" >发布新菜谱</a>吧！
                </p>

            </div>

        </div><!-- 右侧结束 -->
    </div>

</div>

</body>
</html>
